package com.xbongbong.pro.statistic.factory;

import com.xbongbong.pro.service.toolbox.statistic.help.ThroughProService;
import com.xbongbong.pro.statistic.service.ChartResultProService;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.Map;

/**
 * 图表策略类获取工厂
 *
 * @author LiZhikang
 * @date 2022/11/19 14:26
 */
@Component
public class ChartStrategyFactory {

    @Resource
    private Map<Integer, ChartResultProService> chartResultProMap;
    @Resource
    private Map<Integer, ThroughProService> throughProMap;

    /**
     * 获取图表结果增强服务
     *
     * @param businessType
     * @return
     */
    public ChartResultProService getChartResultProService(Integer businessType) {
        return chartResultProMap.get(businessType);
    }

    /**
     * 获取穿透增强服务
     *
     * @param businessType
     * @return
     */
    public ThroughProService getThroughProService(Integer businessType) {
        return throughProMap.get(businessType);
    }
}
